<?php

class dbaMwSt {

   function dbaMwSt (&$dba) {
     $this->dba = &$dba;
   }
  
   function getTaxes (&$data,$ordered = false){
     if ($ordered){
       $orderStr = ' order by satz';
     }
     $check = $this->dba->query("select * from ".$this->dba->tableforwarder."_shopmwst$orderStr;");
     $data = $this->dba->fetch_rows_array();
     return $check;
   }
   
   function getTax (&$result,$id){
     $check = $this->dba->query("select * from ".$this->dba->tableforwarder."_shopmwst where id = $id;");
     $result = $this->dba->fetch_row_array();
     return $check;
   }

   function delTax ($id){
     return $this->dba->query("delete from ".$this->dba->tableforwarder."_shopmwst where id = $id;");
   }

   function updateTax ($id,$satz){
     return $this->dba->query("update ".$this->dba->tableforwarder."_shopmwst set satz=$satz where id = $id;");
   }
   
   function addTax ($satz){
     return $this->dba->query("insert into ".$this->dba->tableforwarder."_shopmwst (satz) values ($satz);");
   }

}
?>
